package cn.com.customer.manager.ui.fragment.me

import cn.com.customer.manager.http.BaseApi
import cn.com.customer.manager.http.subscriber.NoTipRequestSubscriber
import cn.com.customer.manager.manager.TokenManager
import com.xuexiang.xhttp2.XHttpProxy
import com.xuexiang.xhttp2.annotation.ThreadType
import com.xuexiang.xhttp2.model.ApiResult

class MinePresenter constructor(view: MineContact.View) : MineContact.Presenter {
    private var mView: MineContact.View = view

    override fun loginOut() {
        XHttpProxy.proxy(BaseApi.IAuthorization::class.java, ThreadType.TO_IO)
                .loginOut(TokenManager.getInstance().token)
                .subscribeWith(object : NoTipRequestSubscriber<ApiResult<String>>() {
                    override fun onSuccess(t: ApiResult<String>?) {
                        t?.let {
                            //TODO退出
                        }
                    }

                })
    }

    override fun start() {

    }
}